<style>
body {
  overflow: hidden;
  margin: 0px;
  padding: 0px;
  background: white;
}

div:first-child {
  margin-top: 0px;
}

div {
  cursor: pointer;
  text-align: center;
  padding: 1px 3px;
  font-family: sans-serif;
  font-size: 0.8em;
  width: 80px;
  margin-top: 1px;
  background: #cccccc;
}
div:hover {
  background: #aaaaaa;
}

</style>
<script>
function click(color) {
  switch(color.id) {
	case "function0":
		chrome.tabs.executeScript(null,
        {code:"retrieve(0, 10);"});
		break;
	case "function2":
		chrome.tabs.executeScript(null,
        {code:"retrieve(50, 100);"});
		break;
	case "function3":
		chrome.tabs.executeScript(null,
        {code:"retrieve(100, 150);"});
		break;
	case "function4":
		chrome.tabs.executeScript(null,
        {code:"retrieve(150, 200);"});
		break;
	case "function5":
		chrome.tabs.executeScript(null,
        {code:"retrieve();"});
		break;
	case "function6":
		chrome.tabs.executeScript(null,
        {code:"retrieve_category();"});
		break;
	default:
		alert("you should choose one function.\n");
  }
  
  window.close();
}
</script>
<div onclick="click(this)" id="function0">1-10</div>
<div onclick="click(this)" id="function1">1-50</div>
<div onclick="click(this)" id="function2">51-100</div>
<div onclick="click(this)" id="function3">101-150</div>
<div onclick="click(this)" id="function4">151-200</div>
<div onclick="click(this)" id="function5">全部</div>
<div onclick="click(this)" id="function6">获取宝贝类目</div>
